Skip to main content
Version: 11.0

Inventory APIs

POST /api/v2/devices/tree

Description

Get a list of the number of devices by categories and subcategories. Can limit the result to show billable only devices by enabling the 'showBillable' parameter or including the hidden devices by enabling the 'hiddenDevices' flag.

Header Parameters

NameDescriptionTypeRequiredDefault
AuthorizationBearer API token/key. The format is Bearer <API_key>StringYes
orgIdThe ID of the organization. The format is OrgId:OrgNameStringYes
siteIdThe ID of the site. The format is SiteId:SiteNameStringYes

Query Parameters

NameDescriptionTypeRequiredDefault
showBillableFlag for showing/hiding billable subtype. If enabled, the result will contain only a list of billable devicesBooleanNofalse
hiddenDevicesFlag for showing/hiding hidden devices. If enabled, the result will include the hidden devicesBooleanNofalse

CURL Example

The below code snippet shows an example of the API call, where <NCE-IP>, <ORG-ID>, <SITE-ID> & <API-TOKEN> are variables.

curl --location --request POST 'https://<NCE-IP>/api/v2/devices/tree?hiddenDevices=true&showBillable=false' \
--header 'orgId: <ORG-ID>' \
--header 'siteId: <SITE-ID>' \
--header 'Authorization: Bearer <API-TOKEN>'

Response

Upon a successful request, the API returns Status code 200 with the following body:

NameDescriptionType
countCount of the discovered devicesInteger
itemsList of device count by category Compute, Network, Storage, and ClusterObject
- nameCategory nameString
- isBillableBoolean true/false if the category is billableString
- countCount of devices in the categoryInteger
- itemsList of detailed breakdowns of devices by sub-categoryObject
-- nameSub-category nameString
-- countCount of devices in the sub-categoryInteger

POST /api/v2/devices/tableView

Description

Get a list of device details from the Inventory table view.

Header Parameters

NameDescriptionTypeRequiredDefault
AuthorizationBearer API token/key. The format is Bearer <API_key>StringYes
orgIdThe ID of the organization. The format is OrgId:OrgNameStringYes
siteIdThe ID of the site. The format is SiteId:SiteNameStringYes

Body Parameters

NameDescriptionTypeRequiredDefault
pagePage number, starting from 1StringNo1
sizeNumber of devices per page. Minimum size is 1StringNo10
sortSorting criteria in the format: property, (asc,desc). Multiple sort criteria are supportedStringNo
showBillableFlag for showing/hiding billable subtype. If enabled, the result will contain only a list of billable devicesBooleanNofalse
queryStringValidate queryStringStringNo
script_idscriptId to executeStringNo

CURL Example

The below code snippet shows an example of the API call, where <NCE-IP>, <ORG-ID>, <SITE-ID> & <API-TOKEN> are variables.

curl --location --request POST 'https://<NCE-IP>/api/v2/devices/tableView?page=2&size=15&sort=lastUpdateTime%2C%20DESC&queryString=&script_id=&showBillable=true' \
--header 'orgId: <ORG-ID>' \
--header 'siteId: <SITE-ID>' \
--header 'Authorization: Bearer <API-TOKEN>'

Response

Upon a successful request, the API returns Status code 200 with the following body:

NameDescriptionType
pageInfoGeneral information about the page with returned resultsObject
- numberPage number returnedInteger
- sizePage size returnedInteger
- totalRecordsTotal number of recordsInteger
pageDataList of records detailsArray
- orgIdOrganization IDString
- siteIdSite IDString
- siteNameSite nameString
- deviceIdDevice unique IDString
- hostNameDevice hostnameString
- vmNameDevice VM nameString
- ipAddressSetList of IPv4 addresses associated with the deviceArray of strings
- ipv6AddressSetList of IPv6 addresses associated with the deviceArray of strings
- discoveredIpSetList of IPv4 addresses used in device discoveryArray of strings
- discoveredIpAddrDevice IPString
- devTypeDevice typeString
- devSubTypeDevice subtypeString
- vendorDevice vendor nameString
- modelDevice modelString
- platformDevice platform nameString
- platformTypeDevice platform typeString
- versionDevice platform versionString
- serialNumberDevice serial numberString
- fqdnDevice fully qualified domain name (FQDN)String
- fqdnListDevice fully qualified domain names listArray of strings
- domainNameDevice domain nameString
- isVirtualBoolean yes/no if the device is virtualString
- reachableListList of protocols able to connect with the deviceArray of strings
- unreachableListList of protocols able to connect with the device. Each element in the object is constructed by "protocol":"Failure_reason"Object
- reachabilityStatusInternal reachability statusInteger
- discoveredBoolean true/false if the device is considered discovered. Devices discovered by more than ping protocol are considered discoveredBoolean
- deviceStatusDevice statusString
- deviceSubStatusDevice sub statusString
- managersList of device managers names and IPsObject of string tuples
- parentsList of device parent IDsArray of strings
- parentHostNamesList of device parents hostnamesArray of strings
- clustersList of device cluster IDsArray of strings
- managementIpString
- vmDetailInfoDetails about the device (in case of a VM)Object
- serviceList of services running on the deviceArray of objects
-- fsAppRoleService roleString
-- fsServiceService nameString
- groupIdDevice group IDString
- addressDevice physical addressString
- latitudeLatitude of the addressString
- longitudeLongitude of the addressString
- locationDevice locationString
- devLocationString
- sysAppsArray
- vlanSetArray
- scomDiscoveredBoolean yes/no if the device is discovered using Microsoft SCOMString
- allowPurgeBoolean true/false if the device allows purgingBoolean
- sourceThe source of the discovery informationString
- cmdbSysIdThe CMDB ID associated with the deviceString
- cmdbStatusThe last CMDB push statusString
- lastCMDBUpdateTimeLast time the record was pushed to the CMDB. The format is timeyyyy-MM-ddThh:mm:ss.tttZString
- cmdbCommitHashHash of the device changes that was last pushed to the CMDB (used for auto-push)String
- cmdbNextScheduledRunTimeNext time the record will be auto-pushed to the CMDB (used for scheduled push). The format is timeyyyy-MM-ddThh:mm:ss.tttZString
- lastUpdateTimeLast time when the device was updated. The format is timeyyyy-MM-ddThh:mm:ss.tttZString
- userIdUsername that updated the device inventory recordString
- lastDiscoveredLast time when the device was discovered. The format is timeyyyy-MM-ddThh:mm:ss.tttZString
- docStatusString
- updateLogString
- refString
- isVirtualEnumString
- instanceUuidString
- hideUnhideByThe username that hide/unhide the deviceString
- userDefinedFieldsList of user-defined fieldsArray of strings